#FROM python:3.10
FROM reg.yl.com/jenkins/python310:v2
ENV LANG=C.UTF-8
ENV TZ=Asia/Shanghai

USER root

# 复制项目到容器内
ADD . /app/algorithm-news-service

# 设置工作目录
WORKDIR /app/algorithm-news-service

# 安装依赖
RUN apt-get update && \
    ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
    echo $TZ > /etc/timezone && \
    pip install --upgrade pip && \
    pip install --no-cache-dir -i https://maven.jtexpress.com.cn/nexus3/repository/pypi-group/simple -r requirements.txt

RUN chown -R 1000 /app/algorithm-news-service

EXPOSE 8080

CMD ["sh", "start.sh"]